#include"Stack.h"

void StackTest1()
{
	Stack ST;
	StackInit(&ST);
	StackPush(&ST,1);
	StackPush(&ST,2);
	StackPush(&ST,3);
	StackPush(&ST,4);
	StackPush(&ST,5);
	
	if (!StackEmpty(&ST))
	{
		int size = StackSize(&ST);
		for (int i = 0; i < size; i++)
		{
			printf("%d ", StackTop(&ST));
			StackPop(&ST);
		}
	}
	StackPush(&ST, 9);
	StackPush(&ST, 9);
	StackPush(&ST, 9);
	StackPush(&ST, 9);
	StackPush(&ST, 9);
	StackPush(&ST, 9);
	printstack(&ST);
	StackDestroy(&ST);
	printstack(&ST);
}


int main()
{
	StackTest1();
	return 0;
}
